-
Notifications
You must be signed in to change notification settings - Fork 87
many: drop custom distrodefs and use images library
#1066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mvo5
wants to merge
5
commits into
osbuild:main
Choose a base branch
from
mvo5:use-distro-yaml-for-legacy-iso
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. This is used by osbuild/bootc-image-builder#1066
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
…mvo5/images@bootc-rpm-installer
945a411 to
7cd20c3
Compare
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
Instead of having a separate implementation of the required packages and the required lorax templates and similar we now reuse the images `data/distrodefs` YAML so that all the packages/definitions are maintained in a central place.
This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct `ID_LIKE` we should
automatically have the same behavior as before when
we used symlinks as aliases.
If needed we might need to reintroduce an explicit
mapping like:
```go
// mapping of distro IDs that are compatible with
var distroCompat = map[string]string{
"almalinux": "rhel",
"aurora": "fedora",
"aurora-helium": "rhel",
"bazzite": "fedora",
"bluefin": "fedora",
"heliumos": "rhel",
"rocky": "rhel",
}
```
but lets hope we don't need this.
Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)
a86d875 to
5745939
Compare
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
Reuse the helpers from the `images` library for to do: - labelForISO() - getDistroAndRunner() This code moved into images as part of osbuild/images#1906 and we can now reuse it here instead of duplicating it.
Workloads are no longer used in the images library. This NullWorkload is also no longer used so drop it.
distrodefs and use images DistroYAMLdistrodefs and use images library
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[draft until https://github.com/osbuild/images/pull/1979 has landed]
Instead of having a separate implementation of the required
packages and the required lorax templates and similar we
now reuse the images
data/distrodefsYAML so that allthe packages/definitions are maintained in a central place.
The one issue with this is that we no longer support the distrodefs
path concept:
I'm 95% sure this is not used outside of testing but I wanted to call it out.
bib: add support for ID_LIKE when finding the distro YAML
This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct
ID_LIKEwe shouldautomatically have the same behavior as before when
we used symlinks as aliases.
If needed we might need to reintroduce an explicit
mapping like:
but lets hope we don't need this.
Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)
bib: use
imageslibrary for shared bootc helpersReuse the helpers from the
imageslibrary for to do:This code moved into images as part of
osbuild/images#1906
and we can now reuse it here instead of duplicating it.
bib: drop no-longer used NullWorkload
Workloads are no longer used in the images library. This
NullWorkload is also no longer used so drop it.